import http from '../../http/http'
import * as url from '../../http/api'
const state = {
    tableData:[],
}
const actions = {
    mmm({commit}){   //获取商品列表
        http({
          url:url.getGoodsList,
          method:'get',
          params:{
            'page': 1,
            'limit': 10,
          }
        }).then(res =>{
          // if(res.status == 200){
          //     commit('getAllInfo',res.data.page.list)
          // }
          // console.log(res) 
          // console.log(res.data.page.list)
          return res.data.page.list
        }).catch(err => {
          console.log(err)
        })
    },  
}
const mutations = {
    getAllInfo(state,data){
        state.tableData = data
    },
}
const getters = {}
export default {
    state,
    actions,
    mutations,
    getters
}